Alexander Larsson [Mon, 18 Feb 2013 10:23:22 +0000 (11:23 +0100)]
Remove unnecessary copy of GdkFrameClockIdlePrivate
Alexander Larsson [Mon, 18 Feb 2013 10:20:40 +0000 (11:20 +0100)]
win32: Fix build
gdkwindown-win32.c included windows.h directly rather than via gdkwin32.h
which broke the build for me at least. Instead rely on it being included in
gdkwin32.h and things work right.
Alexander Larsson [Mon, 18 Feb 2013 08:38:11 +0000 (09:38 +0100)]
GtkEntry: Fix text handle painting
We only draw the main entry on should_draw (widget->window), because
otherwise we also draw it on the GtkTextHandle widgets.
This is necessary due to the recent change for that to not return
TRUE and swallow the rest of the drawing operation.
Alexander Larsson [Mon, 18 Feb 2013 08:35:58 +0000 (09:35 +0100)]
Add a few missing gtk_widget_unregister_window calls
This was causing warnings on widget unparent like:
Gdk-CRITICAL **: gdk_window_has_native: assertion `GDK_IS_WINDOW (window)' failed
Becasue the window was not properly removed from the lists on unrealize.
Marek Černocký [Sun, 17 Feb 2013 19:06:53 +0000 (20:06 +0100)]
Updated Czech translation
Piotr Drąg [Sun, 17 Feb 2013 18:48:15 +0000 (19:48 +0100)]
Updated Polish translation
Owen W. Taylor [Sat, 16 Feb 2013 16:54:12 +0000 (11:54 -0500)]
GdkWindowX11: the root window is not a toplevel
The macros we had for checking for toplevel windows were passing
through the root window, which was not intentional and meant that
for the root window WINDOW_IS_TOPLEVEL() returned TRUE but
window->impl->toplevel was NULL, causing gdk_window_create_cairo_surface()
to crash.
Paolo Borelli [Sat, 16 Feb 2013 15:28:45 +0000 (16:28 +0100)]
[entry] unregister icon windows
Owen W. Taylor [Sat, 16 Feb 2013 03:21:21 +0000 (22:21 -0500)]
GdkFrameClockIdle: remove timeouts in dispose
When a frame clock is disposed, remove active timeouts; also get
rid of the last traces of an unused GTimer.
Owen W. Taylor [Sat, 16 Feb 2013 02:58:34 +0000 (21:58 -0500)]
GtkScrolledWindow: use gtk_widget_add_tick_callback()
This is slightly simpler and more robust than direct use of
GdkFrameClock.
Changwoo Ryu [Wed, 13 Feb 2013 02:44:00 +0000 (02:44 +0000)]
immodule: Fix context ID lookup on module with multiple contexts
https://bugzilla.gnome.org/show_bug.cgi?id=690247
Jasper St. Pierre [Sat, 16 Feb 2013 00:47:46 +0000 (19:47 -0500)]
Update gtk.symbols
Jasper St. Pierre [Sat, 16 Feb 2013 00:45:45 +0000 (19:45 -0500)]
Update gdk.symbols
Jasper St. Pierre [Sat, 16 Feb 2013 00:42:32 +0000 (19:42 -0500)]
gdkframeclockidle: Don't expose sleep_source source funcs
Jasper St. Pierre [Sat, 16 Feb 2013 00:40:46 +0000 (19:40 -0500)]
gtkplug: Remove a no-op func
Jasper St. Pierre [Sat, 16 Feb 2013 00:35:44 +0000 (19:35 -0500)]
Fix deprecations for GtkIconInfo
Jasper St. Pierre [Sat, 16 Feb 2013 00:48:48 +0000 (19:48 -0500)]
gtkicontheme: Mark copy/free compat symbols as skip
Jasper St. Pierre [Sat, 16 Feb 2013 00:33:01 +0000 (19:33 -0500)]
gdkframeclock: Fix doc comments
William Jon McCann [Fri, 15 Feb 2013 21:21:09 +0000 (16:21 -0500)]
Don't crash if inhibit is called with an unrealized window
Aurimas Černius [Fri, 15 Feb 2013 19:52:54 +0000 (21:52 +0200)]
Updated Lithuanian translation
Baurzhan Muftakhidinov [Fri, 15 Feb 2013 14:53:49 +0000 (20:53 +0600)]
Updated Kazakh translation.
Alexander Larsson [Fri, 15 Feb 2013 14:46:33 +0000 (15:46 +0100)]
Fix gtk_widget_add_tick_callback sometimes not working
We clear GtkTickCallbackInfo on creation to ensure all fields start
as 0. Before we sometimes ended up with destroyed being 1
so the tick was never called.
Alexander Larsson [Fri, 15 Feb 2013 13:02:02 +0000 (14:02 +0100)]
Fix up s/gtk_frame_clock/gdk_frame_clock/ in docs
Alexander Larsson [Fri, 15 Feb 2013 10:07:51 +0000 (11:07 +0100)]
Fix GtkIconInfo docs
gtk_icon_info_copy and gtk_icon_info_free are deprecated for
the corresponding GObject methods.
We set correct transfer markup for the GtkIconInfo returning methods
to fix the introspection of them.
gtk_icon_info_load_symbolic_for_context_async had the wrong method
name in its documentation block.
Carles Ferrando [Fri, 15 Feb 2013 00:30:17 +0000 (01:30 +0100)]
[l10n] Updated Catalan (Valencian) translation
Gil Forcada [Fri, 15 Feb 2013 00:30:07 +0000 (01:30 +0100)]
[l10n] Updated Catalan translation
Cosimo Cecchi [Thu, 14 Feb 2013 23:23:47 +0000 (18:23 -0500)]
Fix a typo in the README
Owen W. Taylor [Thu, 14 Feb 2013 22:11:28 +0000 (17:11 -0500)]
GtkContainer: fix disconnection from frame clock
We need to disconnect the frame clock when we unrealize (at which
point the old clock is still alive) not in destroy(). Since there
is no common unrealize for containers, trigger this from GtkWidget.
Owen W. Taylor [Thu, 14 Feb 2013 21:24:27 +0000 (16:24 -0500)]
GtkTickCallback: document use of G_SOURCE_CONTINUE/REMOVE for return value
Document that G_SOURCE_CONTINUE and G_SOURCE_REMOVE are the preferred
return values from a tick callback.
Owen W. Taylor [Thu, 14 Feb 2013 19:51:33 +0000 (14:51 -0500)]
Don't compress motion events for different devices
A switch of device may be significant for an application, so don't
compress motion events if they are for different devices. This simple
handling isn't sufficient if we have competing event streams from
two different pointer events, but we don't expect this case to be
common.
Owen W. Taylor [Thu, 14 Feb 2013 18:52:09 +0000 (13:52 -0500)]
Ignore window manager protocol messages for destroyed windows
If we get, for example, a _NET_WM_FRAME_DRAWN or _NET_WM_PING
message on a destroyed window, then we should just ignore it.
Owen W. Taylor [Thu, 14 Feb 2013 18:50:55 +0000 (13:50 -0500)]
Small documentation fixes for frame synchronization
Found by Benjamin Otte
Owen W. Taylor [Wed, 13 Feb 2013 13:35:05 +0000 (08:35 -0500)]
gdk_frame_clock_get_frame_time(): use gint64 for time
Owen W. Taylor [Wed, 13 Feb 2013 06:03:52 +0000 (01:03 -0500)]
Merge ... Merge GdkFrameHistory into GdkFrameClock
Owen W. Taylor [Wed, 13 Feb 2013 02:42:49 +0000 (21:42 -0500)]
GdkFrameClock: update documentation
Owen W. Taylor [Tue, 12 Feb 2013 23:26:17 +0000 (18:26 -0500)]
GdkFrameTimings: add documentation
Owen W. Taylor [Tue, 12 Feb 2013 20:03:21 +0000 (15:03 -0500)]
GdkFrameClock: Clean up the public API
* remove gdk_frame_clock_get_frame_time_val(); a convenience
function that would rarely be used.
* remove gdk_frame_clock_get_requested() and
::frame-requested signal; while we might want to eventually
be able to track the requested phases for a clock, we don't
have a current use case.
* Make gdk_frame_clock_freeze/thaw() private: they are only
used within GTK+ and have complex semantics.
* Remove gdk_frame_clock_get_last_complete(). Another convenience
function that I don't have a current use case for.
* Rename:
gdk_frame_clock_get_start() => gdk_frame_clock_get_history_start()
gdk_frame_clocK_get_current_frame_timings() => gdk_frame_clock_get_timings()
Owen W. Taylor [Tue, 12 Feb 2013 21:14:24 +0000 (16:14 -0500)]
GdkFrameTimings: strip down to a minimal public API
Since we're not exporting the ability to create your own frame
clock for now, remove the setters for GdkFrameTimings fields.
Also remove all setters and getters for fields that are more
about implementation than about quantities that are meaningful
to the applcation and just access the fields directly within
GDK.
Owen W. Taylor [Tue, 12 Feb 2013 20:47:38 +0000 (15:47 -0500)]
Merge GdkFrameHistory into GdkFrameClock
Now that GdkFrameClock is a class, not interface, there's no real advantage
to splitting the frame history into an aggregate object, so directly
merge it into GdkFrameClock.
Owen W. Taylor [Tue, 12 Feb 2013 20:02:21 +0000 (15:02 -0500)]
Change GdkFrameClock from an interface to a class
It's unlikely that anyone will want to have, say, a GtkWidget that
also acts as a GdkFrameClock, so an abstract base class is as
flexible as making GdkFrameClock an interface, but has advantages:
- If we decide to never make implementing your own frame clock
possible, we can remove the virtualization.
- We can put functionality like history into the base class.
- Avoids the oddity of a interface without a public interface
VTable, which may cause problems for language bindings.
Owen W. Taylor [Wed, 30 Jan 2013 20:09:44 +0000 (15:09 -0500)]
GdkWindow: make the frame clock an inherent property of the window
Instead of making the frame clock a settable property of a window, make
toplevel windows inherently have a frame clock when created (getting
rid of the default frame clock.) We need to create or destroy frame
clocks when reparenting a window to be a toplevel, or to not be a
toplevel, but otherwise the frame clock for a window is immutable.
Owen W. Taylor [Wed, 19 Dec 2012 17:03:16 +0000 (12:03 -0500)]
Add gtk_widget_add_tick_callback(), remove GtkTimeline, etc.
Add a very simple GtkWidget function for an "tick" callback, which
is connected to the ::update signal of GdkFrameClock.
Remove:
- GtkTimeline. The consensus is that it is too complex.
- GdkPaintClockTarget. In the rare cases where tick callbacks
aren't sufficient, it's possible to track the
paint clock with ::realize/::unrealize/::hierarchy-changed.
GtkTimeline is kept using ::update directly to allow using a GtkTimeline
with a paint clock but no widget.
Owen W. Taylor [Wed, 30 Jan 2013 20:11:59 +0000 (15:11 -0500)]
GdkX11DeviceManagerXI2: handle focus events not on a known window
If we get a focus event for a X window we don't recognize, just
ignore it and avoid a g-critical when
_gdk_device_manager_core_handle_focus() is called with a NULL window.
Owen W. Taylor [Wed, 19 Dec 2012 17:49:32 +0000 (12:49 -0500)]
Reimplement _NET_WM_SYNC_REQUEST inside X11 backend
Deprecate gdk_window_enable_synchronized_configure() and
gdk_window_configure_done() and make them no-ops. Implement the
handling of _NET_WM_SYNC_REQUEST in terms of the frame cycle -
we know that all processing will be finished in the next frame
cycle after the ConfigureNotify is received.
Owen W. Taylor [Wed, 19 Dec 2012 17:01:52 +0000 (12:01 -0500)]
Fix up for newer draft of wm-spec
* 64-bit quantities are consistently ordered low-32-bits / high-32-bits
* data.l[4] in _NET_WM_SYNC_REQUEST indicates which counter to update
Owen W. Taylor [Fri, 16 Nov 2012 15:47:17 +0000 (10:47 -0500)]
video-timer: add simple example of PLL-style clock adjustment
The first version of the video-timer simply played back the video
according to the wall clock, and showed each frame at the neareste
presentatin time. But an alternative strategy for playing back
video is that if the frame-rate is an integer-divisor of the
display refresh rate, or very close to that, is to change the playback
speed to complete avoid frame drops and changes in latency.
(This would require resampling audio if present.)
Demonstrate this technique by adding a --pll option to the
video-timer demo.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 15 Nov 2012 22:39:30 +0000 (17:39 -0500)]
video-timer: add a test case for display at a constant frame rate
Add a test case that simulates the timing operaton that goes on
when showing a constant frame rate stream like a video - each
frame is shown at the VBlank interval that is closest to when it
would ideally be timed.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 15 Nov 2012 19:11:41 +0000 (14:11 -0500)]
Add gdk_frame_timings_get_predicted_presentation_time()
For an operation like synchronizing audio to video playback, we need to
be able to predict the time that a frame will be presented. The details
of this depend on the windowing system, so make the backend predict
a presentation time for ::begin-frame and set it on the GdkFrameTimings.
The timing algorithm of GdkFrameClockIdle is adjusted to give predictable
presentation times for frames that are not throttled by the windowing
system.
Helper functions:
gdk_frame_clock_get_current_frame_timings()
gdk_frame_clock_get_refresh_info()
are added for operations that would otherwise be needed multiple times
in different locations.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 15 Nov 2012 00:21:33 +0000 (19:21 -0500)]
Add GDK_DEBUG=frames
Add a debug option to print out detailed statistics about each frame drawn.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 22:54:03 +0000 (17:54 -0500)]
animated-resizing: enhance output
Show the average and standard deviation of the latency in addition to
the frame rate. Add options to print the output in machine-readable form,
and to control the frequency and total number of statistics that will be
output.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 22:24:02 +0000 (17:24 -0500)]
animated-resizing: make circle size a #define
Clean up the code with a #define for circle size. This also allows
determining we're throttled by number-of-requests or number-of-pixels.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 21:50:05 +0000 (16:50 -0500)]
GdkWindowX11: Communicate gdk_frame_timings_get_slept_before() to the compositor
We want the compositor to do different things for frames where
"slept before" is TRUE. Communicate to the compositor that
frame is a no-delay frame (slept_before=FALSE) by ending the frame
by increasing the counter value by 1, and that the frame is a
normal frame (slept_before=TRUE) by increasing the counter value
by 3.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 21:08:08 +0000 (16:08 -0500)]
Add gdk_frame_timings_get/set_slept_before()
Add functions that tell us whether the main loop slept before we drew
a frame. Blocking with the frame clock frozen doesn't count as sleeping.
We'll use this to advertise to the compositor whether we
are drawing as fast as possible (and it should do the same) or timing
frames carefully (and it should do the same.)
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 18:26:13 +0000 (13:26 -0500)]
GdkFrameClockIdle: don't start the tiemout/idle when in a frame
Don't start the idle if we're in the middle of painting a frame -
this will prevent us from getting the timing right when starting
the idle after the frame.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 17:49:06 +0000 (12:49 -0500)]
Add GdkFrameHistory and GdkFrameTimings, handle _NET_WM_FRAME_TIMINGS
In order to be able to track statistics about how well we are drawing,
and in order to be able to do sophisticated things with frame timing
like predicting per-frame latencies and synchronizing audio with video,
we need to be able to track exactly when previous frames were drawn
to the screen.
Information about each frame is stored in a new GdkFrameTimings object.
A new GdkFrameHistory object is added which keeps a queue of recent
GdkFrameTimings (this is added to avoid further complicating the
implementation of GdkFrameClock.)
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 14 Nov 2012 17:23:41 +0000 (12:23 -0500)]
GdkWindowX11: Only start a frame when we emit damage
Instead of communicating the start of a frame to the window manager
as soon as we begin a frame, start a frame only when we know we've
actually created damage to the contents of a window.
(This uses cairo_set_mime_data() as a notification mechanism - a
clever suggestion from Uli Schlachter.)
The advantage of this is that we aren't forcing the compositor to
do a frame cycle and send _NET_WM_FRAME_DRAWN - depending on how the
compositor is structured that might either cause it to do extra
work or it might send _NET_WM_FRAME_DRAWN early and upset frame
timing.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Sun, 7 Oct 2012 18:13:56 +0000 (14:13 -0400)]
GdkDisplay: handle multiple calls to _gdk_display_pause_events()
Since events can be paused independently for each window during processing,
make _gdk_display_pause_events() count how many times it is called
and only unpause when unpause_events() is called the same number of
times.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Sun, 7 Oct 2012 15:47:49 +0000 (11:47 -0400)]
gdk_display_get_event: don't unqueue events from the windowing system when paused
Unqueuing events from the windowing system when paused could result
in weird reordering if event filters resulted in application-visible
behavior. Since we now resume events when the frame clock is frozen,
we now no longer count on low-level event handling running while
event handling is paused.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Sun, 7 Oct 2012 15:42:45 +0000 (11:42 -0400)]
GdkFrameClock: Reverse order of resume-events and afterpaint
Keeping events paused after the end of a frame put us in a
weird state where we had to process and queue events - so that
we would get the message from the compositor - but not deliver
them. Instead resume events before ending the frame.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 26 Sep 2012 14:28:06 +0000 (10:28 -0400)]
Compress motion synchronized with the paint cycle
When we have pending motion events, instead of delivering them
directly, request the new FLUSH_EVENTS phase of the frame clock.
This allows us to compress repeated motion events sent to the
same window.
In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1,
we deliver any pending motion events then turn off event delivery
until the end of the next frame. Turning off event delivery means
that we'll reliably paint the compressed motion events even if more
have arrived.
Add a motion-compression test case which demonstrates behavior when
an application takes too long handle motion events. It is unusable
without this patch but behaves fine with the patch.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Tue, 2 Oct 2012 23:54:15 +0000 (19:54 -0400)]
GtkScrolledWindow: use GdkFrameClock for kinetic scrolling
Use GdkFrameClock when animating scrolling via touch, rather
than a timeout.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Tue, 18 Sep 2012 22:21:08 +0000 (18:21 -0400)]
Add a test of an animated resizing window
Add a test of a window with an animated size and contents. The
test accepts load factor command line argument to see how things
work as the drawing of the content requires more GPU resources.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Fri, 28 Sep 2012 16:38:14 +0000 (12:38 -0400)]
GtkTimeline: Wrap around the progress correctly when looping
When we have a looping animation for something like an angle,
we need to make sure that the distance we go past 1.0 becomes
the starting distance for the next frame. This prevents a
stutter at the loop position.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 27 Sep 2012 21:05:22 +0000 (17:05 -0400)]
GtkTimeline: introspection fixes, add :progress-type property
Fix up introspection information for GtkTimeline, install the
header has a public heaer, and add the property for :progress-type.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 27 Sep 2012 20:27:36 +0000 (16:27 -0400)]
Hook GtkTimeline up to GdkFrameClock
Use GdkFrameClock for the timing of GtkTimeline. This require the
user to provide either a GtkWidget or a GdkFrameClock when creating
the timeline. The default constructor now takes a GtkWidget. If you
want to create a GdkFrameClock without a widget, you need to use
g_object_new() and pass in a GdkFrameClock and GdkScreen.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 10 Nov 2011 23:01:44 +0000 (18:01 -0500)]
GtkTimeline: remove settable FPS
The frames-per-second for an animation should be controlled by how
fast we can process frames and the the frame-rate of the display; it's not
a meaningful app-settable property.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Fri, 27 Jul 2012 08:56:51 +0000 (04:56 -0400)]
Add back GtkTimeline
Add back the GtkTimeline code that previously made private and
then removed. It will be hooked up to GdkFrameClock. This commit
purely adds the old code back.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 26 Sep 2012 19:44:30 +0000 (15:44 -0400)]
Add an UPDATE phase and GdkFrameClockTarget, use for GtkStyleContext
Switch GtkStyleContext to using GdkFrameClock. To do this, add a new
UPDATE phase to GdkFrameClock.
Add a GdkFrameClockTarget interface with a single set_clock() method,
and use this to deal with the fact that GtkWidget only has a frame
clock when realized.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 27 Sep 2012 21:55:55 +0000 (17:55 -0400)]
GdkFrameClockIdle: add throttling to 60fps
If the backend is throttling paints, then the frame clock will be
frozen at the end of the frame. If not, then we need to add throttling,
so wait until 16ms after the start of the frame before beginning the
next frame.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 4 Oct 2012 00:15:44 +0000 (20:15 -0400)]
GdkWindowX11: start off with an odd frame-counter value
By starting with an odd frame counter value, we make the mapping
and initial paint of the window an atomic operation, avoiding
any visual artifacts from an unpainted window.
Possible improvement: start the frame when doing gdk_window_show(),
so that the same improvement occurs for windows that were previously
shown and are being mapped again.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Thu, 4 Oct 2012 00:13:42 +0000 (20:13 -0400)]
Freeze the update counter for unmapped windows
When a window is unmapped, freeze its frame clock. This avoids doing
unnecessary work, but also means that we won't block waiting for
_NET_WM_FRAME_DRAWN messages that will never be received since the
frame ended while the window was withdrawn.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Tue, 18 Sep 2012 13:37:03 +0000 (09:37 -0400)]
Use _NET_WM_FRAME_DRAWN to synchronize frame drawing
As part of the extended _NET_WM_SYNC_REQUEST_COUNTER protocol,
we get a _NET_WM_FRAME_DRAWN message for each frame we draw. Use this
to synchronize the updates we are doing with the compositing manager's
drawing, and ultimately with with display refresh.
We now set the sync request counters on all windows, including
override-redirect windows, since it is also useful to do synchronized,
atomic updates for such windows.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Tue, 18 Sep 2012 13:31:17 +0000 (09:31 -0400)]
Switch to an extended form of _NET_WM_SYNC_REQUEST_COUNTER
By exporting two XSync counters on a toplevel window, we subscribe
to an extended form of the _NET_WM_SYNC_REQUEST_COUNTER protocol,
where the window manager can initiate an atomic frame, as previously,
but the application can also do so by incrementing the new counter to
an odd value, and then to an even value to finish the frame.
See:
https://mail.gnome.org/archives/wm-spec-list/2011-October/msg00006.html
The support for 64-bit integers that GLib requires is used to
simplify the logic.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 3 Oct 2012 23:42:13 +0000 (19:42 -0400)]
GdkFrameClock: add freeze/thaw
Add the ability to freeze a frame clock, which pauses its operation,
then thaw it again later to resume.
Initially this is used to implement freezing updates when we are
waiting for ConfigureNotify in response to changing the size of
a toplevel.
We need a per-window clock for this to work properly, so add that
for the X11 backend.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 3 Oct 2012 23:38:40 +0000 (19:38 -0400)]
GdkFrameClock: Make the phase explicit when requesting the frame
Instead of having gdk_frame_clock_request_frame() have
gdk_frame_clock_request_phase() where we can say what phase we need.
This allows us to know if we get a frame-request during layout whether
it's just a request for drawing from the layout, or whether another
layout phase is needed.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Tue, 18 Sep 2012 13:00:57 +0000 (09:00 -0400)]
Use GdkFrameClock for relayout
Add a ::layout signal to GdkFrameClock and use it instead of an idle
handler to drive the restyling and relayout of containers.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 3 Oct 2012 22:34:01 +0000 (18:34 -0400)]
Add GdkFrameClock
Add an object GdkFrameClock that we associate with a GdkWindow.
This tracks when the window needs to be repainted, and will also
be used for other operations in the future like relayout and
updating animations.
Based on a patch from Havoc Pennington:
https://mail.gnome.org/archives/gtk-devel-list/2010-October/msg00004.html
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Owen W. Taylor [Wed, 19 Sep 2012 02:13:06 +0000 (22:13 -0400)]
GdkDisplayX11: Don't use substructure events in internal accounting
We may receive events because SubstructureNotifyMask has been selected
for the root window. (Most likely, this would occur because GTK+
is being used inside a window manager like Metacity or Mutter.)
This can confuse various types of internal accounting, so detect
such events and comprehensively ignore them for GDK's internal
purposes. We still need to generate GDK events for these cases
because you can select for substructure events with
GDK_SUBSTRUCTURE_MASK.
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Alexander Larsson [Thu, 14 Feb 2013 22:01:19 +0000 (23:01 +0100)]
gtk3-demo: Fix up resource handling
We're not loading css files via resouce uris, as we want
to support editing, so we need to use absolute references
to any included resources.
Alexander Larsson [Thu, 14 Feb 2013 21:54:39 +0000 (22:54 +0100)]
Add new GtkIconInfo calls to the reference docs
Alexander Larsson [Thu, 14 Feb 2013 21:52:49 +0000 (22:52 +0100)]
Update README.in for the GtkIconInfo type change
Alexander Larsson [Thu, 14 Feb 2013 15:01:04 +0000 (16:01 +0100)]
GtkIconTheme: Add async versions of symbolic icon loaders
https://bugzilla.gnome.org/show_bug.cgi?id=693802
Alexander Larsson [Thu, 14 Feb 2013 13:58:02 +0000 (14:58 +0100)]
GtkIconTheme Don't leak pixbuf in symbolic icon cache
We need to unref the pixbuf we just put in the cache, because
symbolic_pixbuf_cache_new takes a ref.
https://bugzilla.gnome.org/show_bug.cgi?id=693802
Alexander Larsson [Thu, 14 Feb 2013 12:32:30 +0000 (13:32 +0100)]
Add gtk_icon_info_load_icon_async
This lets you asynchronously load icons. We need this for gnome-shell
to replace its current non-threadsafe use of GtkIconTheme.
https://bugzilla.gnome.org/show_bug.cgi?id=693802
Alexander Larsson [Wed, 13 Feb 2013 14:05:02 +0000 (15:05 +0100)]
Make GtkIconInfo a GObject
This is necessary in order to have async operations on it.
All the old copy/free functions keeps working, and g_boxed_copy on a GObject
also works, so this should be mostly compatible, but techncally its a minor
ABI break since the GType changes fundamental type. Changes like this has
happened before though, like with GVariant becomming its own fundamental
type.
https://bugzilla.gnome.org/show_bug.cgi?id=693802
Anish A [Thu, 14 Feb 2013 19:10:04 +0000 (23:10 +0400)]
Revert "Updated Malayalam Localization"
This reverts commit
bff9de1adcb4ddef53d52fb1f296be35c2cda16b.
Anish A [Thu, 14 Feb 2013 19:08:33 +0000 (23:08 +0400)]
Updated Malayalam Localization
Rob Bradford [Thu, 14 Feb 2013 13:28:07 +0000 (13:28 +0000)]
wayland: Add support for output device removal
Since we only receive an object id for the removed object we must try and
remove that from the list of devices based on that id.
Rob Bradford [Thu, 14 Feb 2013 13:00:19 +0000 (13:00 +0000)]
wayland: Add basic multiple output support
Store the wl_output pointer within the the GdkWaylandMonitor structure.
Federico Mena Quintero [Wed, 13 Feb 2013 21:21:12 +0000 (15:21 -0600)]
filechooserbutton: Add tests for SELECT_FOLDER mode with the dialog active
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Wed, 13 Feb 2013 21:07:33 +0000 (15:07 -0600)]
filechooser: Oops, cancel a file operation that was missing
In addition, remove a list of pending_cancellables that was no longer being used.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Wed, 13 Feb 2013 19:42:38 +0000 (13:42 -0600)]
filechooserbutton: Add a battery of tests for GtkFileChooserButton
These are generic tests that can test the button in all of its modes,
instead of hand-written tests for each combination.
Some tests fail currently.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Wed, 13 Feb 2013 18:12:50 +0000 (12:12 -0600)]
filechooserbutton: In SELECT_FOLDER mode, consider an empty selection to mean current_folder
If the user didn't explicitly select anything, BUT the file chooser button has
a current_folder set, do the same as what GtkFileChooserDefault would do:
return the current folder as the selection.
This makes the tests in tests/filechooser pass!
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Wed, 13 Feb 2013 17:47:35 +0000 (11:47 -0600)]
filechooserbutton: Keep track of the current_folder while the dialog is inactive
This is analogous to keeping the selection while the dialog is inactive.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Wed, 13 Feb 2013 17:14:36 +0000 (11:14 -0600)]
filechooser: Fix cast
Federico Mena Quintero [Wed, 13 Feb 2013 17:14:17 +0000 (11:14 -0600)]
filechooserbutton: Remove unused function prototypes
Federico Mena Quintero [Wed, 13 Feb 2013 17:01:50 +0000 (11:01 -0600)]
filechooserbutton: Restore to an empty previous selection properly
If no file was originally selected in the GtkFileChooserButton, then its
internal dialog is brought up and cancelled, then we need to restore the
selection back to none. GtkFileChooser, though, doesn't like to
select a NULL file, so call _unselect_all() in that condition.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Tue, 12 Feb 2013 05:12:20 +0000 (23:12 -0600)]
filechooserbutton: Add test for setting/getting the current folder; currently fails
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Tue, 12 Feb 2013 05:03:26 +0000 (23:03 -0600)]
filechooserbutton: Fix preserving the selection after cancelling the dialog
The button's underlying file chooser dialog should not be used to store the file selection
while the dialog is unmapped. Instead, the file chooser button now stores the
selection itself.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Federico Mena Quintero [Tue, 12 Feb 2013 02:12:32 +0000 (20:12 -0600)]
filechooser: Remove some unused code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>